<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

namespace ApplicationsModule\MailModule;

use Nette\Object;


/**
 * Description of Attachment
 *
 * @author honza
 */
class Attachment extends Object{
    /** @var int */
    private $mail_id = null;
    /** @var int */
    private $part_id = null;
    /** @var string */
    private $name = "";
    /** @var string*/
    private $fileName = "";
    /** @var int */
    private $type = null;
    /** @var string*/
    private $subtype = "";
    /** @var int */
    private $bytes = null;
    /** @var string */
    private $data = null;
    /** @var string */
    private $mime_type;
    /** @var int */
    private $encoding;
    
    public function getMail_id() {
        return $this->mail_id;
    }

    public function setMail_id($mail_id) {
        $this->mail_id = $mail_id;
    }

    public function getPart_id() {
        return $this->part_id;
    }

    public function setPart_id($part_id) {
        $this->part_id = $part_id;
    }

    public function getName() {
        return $this->name;
    }

    public function setName($name) {
        $this->name = $name;
    }

    public function getType() {
        return $this->type;
    }

    public function setType($type) {
        $this->type = $type;
    }

    public function getSubtype() {
        return $this->subtype;
    }

    public function setSubtype($subtype) {
        $this->subtype = $subtype;
    }

    public function getBytes() {
        return $this->bytes;
    }

    public function setBytes($bytes) {
        $this->bytes = $bytes;
    }

    public function getFileName() {
        return $this->fileName;
    }

    public function setFileName($fileName) {
        $this->fileName = $fileName;
    }

    public function getData() {
        return $this->data;
    }

    public function setData($data) {
        $this->data = $data;
    }

    public function getMime_type() {
        return $this->mime_type;
    }

    public function setMime_type($mime_type) {
        $this->mime_type = $mime_type;
    }

    public function getEncoding() {
        return $this->encoding;
    }
    
    public function getEncodingString() {
        $enc = $this->getEncoding();
        if ($enc == 0)
            return "8bit";
        if ($enc == 1)
            return "8bit";
        if ($enc == 2)
            return "binary";
        if ($enc == 3)
            return "base64";
        if ($enc == 4)
            return "quoted_printable";
        if ($enc == 5)
            return "";
    }

    public function setEncoding($encoding) {
        $this->encoding = $encoding;
    }


    
}